package com.marchsoft.group.manager.common.exception;

import com.marchsoft.group.manager.common.enums.ResultEnum;
import lombok.Getter;


@Getter //自动为属性生成get方法注解
public class BadRequestException extends  RuntimeException{
    //400
    private Integer status;

    public BadRequestException(String msg) {
        super(msg);
    }

    public BadRequestException(Integer status, String msg) {
        super(msg);
        this.status = status;
    }

    public BadRequestException(ResultEnum resultEnum) {
        super(resultEnum.getMsg());
        this.status = resultEnum.getCode();
    }

}
